package com.red.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName
public class Emp {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private String anumber;
    private String password;
    private Integer sex;
    private Integer roleId;
    private String phone;
    private String email;
    private String address;

    @TableField(exist = false)
    private String sexName;
    public String getSexName() {
        String sexName = null;
        if(sex == 1){
            sexName = "男";
        }else{
            sexName = "女";
        }
        return sexName;
    }
}
